<?php
spl_autoload_register('loader');
spl_autoload_register('error_404');

function loader($class)
{
	$file = ROOT_PATH . 'server/' . str_replace('_','/',$class) . '.php';
	if (is_file($file)) {
		require_once ($file);
	}
	$file = ROOT_PATH . "lib/{$class}.php";
	if (is_file($file)) {
		require_once ($file);
	}
}
?>